<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template match="zapping">

<xsl:for-each select="gallery">
<xsl:choose>
	<xsl:when test='@openingsmall and string-length(@opening) = 0'>
		<div style="float:left;height:150px;"><center><a href="/gallery/galleryShow.aspx?gid={@gid}"><img border="0" src="/imgs/gallery/thumb/{@openingsmall}"/></a></center></div>
	</xsl:when>
	<xsl:when test='@openingsmall'>
		<div style="float:left;height:150px;"><center><a href="/gallery/galleryShow.aspx?gid={@gid}"><img border="0" src="/imgs/gallery/opening/{@openingsmall}"/></a></center></div>
	</xsl:when>
	<xsl:otherwise>
			<img src="/imgs/gallery/emptysmall.gif"/>
	</xsl:otherwise>
</xsl:choose>
</xsl:for-each>

<div style="height:30px; clear:left;text-align:center;">
		<form action="" method="get">		
		<input type="hidden" name="gallery" value="1"/>
		<input type="submit" value="Ancora zapping!"/>
		</form>
</div>

</xsl:template>

</xsl:stylesheet>